Skip to content

Conversation

@anna-tran
Copy link
Contributor

@anna-tran anna-tran commented Nov 27, 2025

What this PR does
Updates the blocks cleaner to clean completed partition groups in 2 cycles instead of 1.
In the first cycle of the cleaner,

  1. mark parent blocks of completed partition groups as deleted
  2. update the bucket index to add the new result blocks and remove deleted blocks

Even if another compactor sees a stale version of the bucket index from step 1, it won't create a new partition group because the partition group file still exists.

In the second cycle of the cleaner,

  1. delete the existing partition group info

Which issue(s) this PR fixes:
Fixes #7129

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Anna Tran <trananna@amazon.com>
Signed-off-by: Anna Tran <trananna@amazon.com>
Signed-off-by: Anna Tran <trananna@amazon.com>
Copy link
Contributor

@danielblando danielblando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@alexqyle
Copy link
Contributor

LGTM

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yeya24 yeya24 merged commit 63401ed into cortexproject:master Dec 1, 2025
51 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Double compaction after completing partitioning compaction job

4 participants